package com.sskj.finance.bean;

import com.sskj.lib.util.CoinUtil;
import com.sskj.lib.util.TimeFormatUtil;

import java.util.Date;

public class HomeBorrowGetTransrecordBean {

 /**
  * type : 1
  * out_pname : ETH
  * in_pname : CQTF
  * out_num : 5.0000
  * in_num : 60.0000
  * day_rate : 0.000400
  * rate : 0.010000
  * addtime : 1557558274
  * endtime : 1560182400
  * selltime : 1557558705
  * status : 2
  * days : 30
  * fee : 0.6000
  * dayth : 0
  * risk : 0
  */

 private String tran_id;
 private String type;
 private String out_pname;
 private String in_pname;
 private String out_num;
 private String in_num;
 private String day_rate;
 private String rate;
 private String addtime;
 private String endtime;
 private String selltime;
 private String status;
 private String days;
 private String fee;
 private String dayth;
 private String risk;

 public String getTran_id() {
  return tran_id;
 }

 public void setTran_id(String tran_id) {
  this.tran_id = tran_id;
 }

 public String getType() {
  return type;
 }

 public void setType(String type) {
  this.type = type;
 }

 public String getOut_pname() {
  return out_pname;
 }

 public void setOut_pname(String out_pname) {
  this.out_pname = out_pname;
 }

 public String getIn_pname() {
  return in_pname;
 }

 public void setIn_pname(String in_pname) {
  this.in_pname = in_pname;
 }

 public String getOut_num() {
  return CoinUtil.keepCoinNumMax(out_pname,out_num);
 }

 public void setOut_num(String out_num) {
  this.out_num = out_num;
 }

 public String getIn_num() {
  return CoinUtil.keepCoinNumMax(in_pname,in_num);
 }

 public void setIn_num(String in_num) {
  this.in_num = in_num;
 }

 public String getDay_rate() {
  return day_rate;
 }

 public void setDay_rate(String day_rate) {
  this.day_rate = day_rate;
 }

 public String getRate() {
  return CoinUtil.keepCoinNumMax(out_pname,rate);
 }

 public void setRate(String rate) {
  this.rate = rate;
 }

 public String getAddtime() {
  return TimeFormatUtil.SF_FORMAT_E.format(new Date(Long.valueOf(addtime)*1000));
 }

 public void setAddtime(String addtime) {
  this.addtime = addtime;
 }

 public String getEndtime() {
  return TimeFormatUtil.SF_FORMAT_B.format(new Date(Long.valueOf(endtime)*1000));
 }

 public void setEndtime(String endtime) {
  this.endtime = endtime;
 }

 public String getSelltime() {
  return TimeFormatUtil.SF_FORMAT_B.format(new Date(Long.valueOf(selltime)*1000));
 }

 public void setSelltime(String selltime) {
  this.selltime = selltime;
 }

 public String getStatus() {
  return status;
 }

 public void setStatus(String status) {
  this.status = status;
 }

 public String getDays() {
  return days;
 }

 public void setDays(String days) {
  this.days = days;
 }

 public String getFee() {
  return fee;
 }

 public void setFee(String fee) {
  this.fee = fee;
 }

 public String getDayth() {
  return dayth;
 }

 public void setDayth(String dayth) {
  this.dayth = dayth;
 }

 public String getRisk() {
  return risk;
 }

 public void setRisk(String risk) {
  this.risk = risk;
 }
}
